home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ELECTRON / PCB_DESI / 1540.ZIP / PCBCA110.ZIP / UTIL.ASM < prev    next >
Assembly Source File  |  1989-12-27  |  1KB  |  53 lines

  1. ; assembly language graphics support routines
  2.  
  3. _DATA    segment    word public 'DATA'
  4. _DATA    ends
  5.  
  6. DGROUP    group    _DATA
  7.  
  8. _TEXT    segment    byte public 'CODE'
  9.     assume    cs:_TEXT, ds:DGROUP
  10.  
  11. if 0
  12.  
  13. ;void Dot( int color, int row, int col );
  14.     public    _Dot
  15. _Dot        proc    near        ; write a dot on the screen
  16.         push    bp
  17.         mov    bp, sp
  18.         mov    al, [bp+4]    ; get color (byte)
  19.         mov    ah, 0Ch        ; write pixel function
  20.         xor    bx, bx
  21.         mov    dx, [bp+6]    ; get row
  22.         mov    cx, [bp+8]    ; get column
  23.         int    10h        ; call video rom bios
  24.         pop    bp
  25.         ret
  26. _Dot        endp
  27.  
  28. ;int GetMode( void );
  29.     public    _GetMode
  30. _GetMode    proc    near        ; get the screen mode
  31.         mov    ah, 0Fh        ; get mode function
  32.         int    10h        ; call video rom bios
  33.         xor    ah, ah        ; clear top byte (low byte has mode)
  34.         ret
  35. _GetMode    endp
  36.  
  37. ;void SetMode( int mode );
  38.     public    _SetMode
  39. _SetMode    proc    near        ; set the screen mode
  40.         push    bp
  41.         mov    bp, sp
  42.         mov    al, [bp+4]    ; get new mode
  43.         xor    ah, ah        ; set mode function
  44.         int    10h        ; call video rom bios
  45.         pop    bp
  46.         ret
  47. _SetMode    endp
  48.  
  49. endif
  50.  
  51. _TEXT        ends
  52.         end
  53.